<style>
    .col-sm-8{
        padding-top: 5px !important;
    }
</style>
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Res_type')}:</label>
        <div class="col-xs-12 col-sm-8">
            {if $row.res_type == 'order'}
            <span class="label label-info">订单</span>
            {else}
            <span class="label label-info">预订单</span>
            {/if}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('资源编号')}:</label>
        <div class="col-xs-12 col-sm-8">
            {$row.res_no}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('事件')}:</label>
        <div class="col-xs-12 col-sm-8">
            {$row['detailJson']['description']}
        </div>
    </div>
    {if $row['event_type'] != 'delete-servicesitems' && $row['event_type'] != 'delete-roomitems' && $row['event_type'] != 'edit-room'}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Detail')}:</label>
        <div class="col-xs-12 col-sm-8">
            <table class="table table-striped table-bordered table-nowrap"
                   width="100%">
                <thead>
                    <tr>
                        <th></th>
                        <th>前</th>
                        <th>后</th>
                    </tr>
                </thead>
                <tbody>
                    {foreach name="row['detailJson']['old']" id="item" key="key"}
                    <tr>
                        <th>{$detailKeyConfig[$key]}</th>
                        <td>
                            {switch name="$key"}
                                {case value="sex"}
                                    {if $item == 1}男孩{else}女孩{/if}
                                {/case}
                                {case value="birthday"}
                                    {:date('Y-m-d', $item)}
                                {/case}
                                {case value="price_json"}
                                    {for start="0" end="count($item)"}
                                    <p><label>{$item[$i]['day']}: </label> &yen;{$item[$i]['price']}</p>
                                    {/for}
                                {/case}
                                {case value="addons"}
                                    <?php $addonsSplit = explode(',', $item); ?>
                                    {for start="0" end="count($addonsSplit)"}
                                    <a href="{$addonsSplit[$i]}" target="_blank"><img src="{$addonsSplit[$i]}" width="50" /></a>
                                    {/for}
                                {/case}
                                {case value="total_price"}
                                    &yen;{:number_format($item)}
                                {/case}
                                {case value="list"}
                                    {for start="0" end="count($item)"}
                                    <ul class="list-group">
                                      <li class="list-group-item">姓名: {$item[$i]['realname']}</li>
                                      <li class="list-group-item">性别: {if $item[$i]['sex'] == 1}先生{else}女士{/if}</li>
                                      <li class="list-group-item">证件类型: {$item[$i]['certificates_type']}</li>
                                      <li class="list-group-item">证件号码: {$item[$i]['person_no']}</li>
                                      <li class="list-group-item">出生日期: {:date('Y-m-d', $item[$i]['birthday'])}</li>
<!--                                      <li class="list-group-item">联系电话: {$item[$i]['tel']}</li>-->
                                    </ul>
                                    {/for}
                                {/case}
                                {default /}{$item}
                            {/switch}
                        </td>
                        <td>
                            {switch name="$key"}
                                {case value="sex"}
                                    {if $row['detailJson']['new'][$key] == 1}男孩{else}女孩{/if}
                                {/case}
                                {case value="birthday"}
                                    {:date('Y-m-d', $row['detailJson']['new'][$key])}
                                {/case}
                                {case value="price_json"}
                                    {for start="0" end="count($row['detailJson']['new'][$key])"}
                                    <p><label>{$row['detailJson']['new'][$key][$i]['day']}: </label> &yen;{$row['detailJson']['new'][$key][$i]['price']}</p>
                                    {/for}
                                {/case}
                                {case value="addons"}
                                    <?php $addonsSplit = explode(',', $row['detailJson']['new'][$key]); ?>
                                    {for start="0" end="count($addonsSplit)"}
                                    <a href="{$addonsSplit[$i]}" target="_blank"><img src="{$addonsSplit[$i]}" width="50" /></a>
                                    {/for}
                                {/case}
                                {case value="total_price"}
                                    &yen;{:number_format($row['detailJson']['new'][$key])}
                                {/case}
                                {case value="list"}
                                    {for start="0" end="count($row['detailJson']['new'][$key])"}
                                    <ul class="list-group">
                                      <li class="list-group-item">姓名: {$row['detailJson']['new'][$key][$i]['realname']}</li>
                                      <li class="list-group-item">性别: {if $row['detailJson']['new'][$key][$i]['sex'] == 1}先生{else}女士{/if}</li>
                                      <li class="list-group-item">证件类型: {$row['detailJson']['new'][$key][$i]['certificates_type']}</li>
                                      <li class="list-group-item">证件号码: {$row['detailJson']['new'][$key][$i]['person_no']}</li>
                                      <li class="list-group-item">出生日期: {:date('Y-m-d', $row['detailJson']['new'][$key][$i]['birthday'])}</li>
<!--                                      <li class="list-group-item">联系电话: {$row['detailJson']['new'][$key][$i]['tel']}</li>-->
                                    </ul>
                                    {/for}
                                {/case}
                                {default /}{$row['detailJson']['new'][$key]}
                            {/switch}
                        </td>
                    </tr>
                    {/foreach}
                </tbody>
            </table>
        </div>
    </div>
    {/if}

</form>
